package com.stylefeng.guns.biz.api.task;

import com.stylefeng.guns.modular.platform.service.IUserTaskFlowsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class UserTaskFlowsTask {

    @Autowired
    private IUserTaskFlowsService iUserTaskFlowsService;

    /**
     * 每天0点把所有任务完成度置0
     */
//    @Scheduled(cron = "0/10 * * * * ?")
    @Scheduled(cron = "0 0 0 * * ?")
    public void userTaskFlowsTimer(){

        iUserTaskFlowsService.initTaskCompleteNums();

    }
}
